package com.ruoyi.develop.goodsSaledoGongxu.mapper;

import java.util.List;
import java.util.Map;

import com.ruoyi.develop.goodsSaledoGongxu.domain.GoodsSaledoGongxu;
import org.apache.ibatis.annotations.Param;
/**
 * 订单产品工艺工序关联Mapper接口
 * @author qh
 * @date 2024-11-03
 */
public interface GoodsSaledoGongxuMapper {
    /**
     * 查询订单产品工艺工序关联
     * @param id 订单产品工艺工序关联主键
     * @return 订单产品工艺工序关联
     */
    public GoodsSaledoGongxu selectById(String id);

    /**
     * 查询订单产品工艺工序关联列表
     * @param entity 订单产品工艺工序关联
     * @return 订单产品工艺工序关联集合
     */
    public List<GoodsSaledoGongxu> selectList(GoodsSaledoGongxu entity);

    public List<GoodsSaledoGongxu> listSalePro(GoodsSaledoGongxu entity);

    public List<GoodsSaledoGongxu> listSaleProByPhone(String[] idsString);

    public List<GoodsSaledoGongxu> listSaleProFinish(GoodsSaledoGongxu entity);

    public List<GoodsSaledoGongxu> selectBySaleId(String saleId);

    public GoodsSaledoGongxu selectMinFinish(String saleId);

    public GoodsSaledoGongxu selectLastFinish(String saleId);
    /**
     * 新增订单产品工艺工序关联
     * @param entity 订单产品工艺工序关联
     * @return 结果
     */
    public int insert(GoodsSaledoGongxu entity);

    /**
     * 修改订单产品工艺工序关联
     * @param entity 订单产品工艺工序关联
     * @return 结果
     */
    public int update(GoodsSaledoGongxu entity);

    public int updateStatusByParentId(@Param("status")String status,@Param("saleId")String saleId);
    /**
     * 删除订单产品工艺工序关联
     * @param id 订单产品工艺工序关联主键
     * @return 结果
     */
    public int deleteById(String id);

    public void deleteBySaleId(String saleId);
    /**
     * 批量删除订单产品工艺工序关联
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteByIds(String[] ids);

    public void updateAllNotLast(@Param("saleId")String saleId);

    public void updateLastById(@Param("id")String id);

    void replaceGoodsInfo(Map<String, Object> params);
}
